import java.util.Arrays;
class A {
    int b;
    int a;
    int max;
    void setA(int a,int b) {
        this.b = b;
        this.a = a;
    }
     int Max(){
        max=Math.max(a,b);
        return max;
    }
    int getA() {
        for (int i = Max(); i <= a*b; i++) {
            if(i%a==0&&i%b==0){
                B s2=new B();
                s2.a=a*b;
                s2.m(i);
                return i;
            }
        }
        return 1;
    }
}
class B {
    int a;
    public void m(int i){
        a=a/i;
        System.out.println("最大公因数："+a);
    }
}
public class Main {
    public static void main(String[] args) {
        A s1 = new A();
        s1.setA(3, 6);
        int a = s1.getA();
        System.out.println("最小公倍数："+a);
    }
}